package leetcode;

import java.util.HashMap;
import java.util.Map;

public class MapSample {


    public static void main(String[] args) {

        Map<Integer, Sample> map = new HashMap<>();
        Sample sample = new Sample();
        sample.setId(1);
        sample.setName("zhang");

        map.put(1, sample);
        System.out.println(map);

        map.get(1).setId(2);
        System.out.println(map);
    }
}
